package com.itheima2.work7;

public class LaoShu {
    public static void main(String[] args) {

        int count = getOptimalSolution(5, 5);
        System.out.println(count);
    }

    public static int getOptimalSolution(int x, int y) {
        int count = 0;
        if (x == 1 || y == 1) {
            return 1;
        }
        return getOptimalSolution(x,y-1)+getOptimalSolution(x-1,y);


    }
}
